<?php 	defined('_JEXEC') or die('Restricted access');	//九核模块，由【九木核心】开发制作：www.jmcore.com

	$n=2; //设置项名称中的最大编号，如有 v_100，则置：$n=100; 
	for ($i =0; $i <= $n; $i++)  $v[$i] = trim($params->get('v_'.$i));

	if($v[0]) JFactory::getDocument()->addStyleDeclaration($v[0]);
	$app = JFactory::getApplication();
	$t = $app->getTemplate(); 
	$p = jmcore::get_tpara();
	for ($i = 10; $i < 30; $i++) { ${'p'.$i} = $p[$i]; }

	$menu = $app->getMenu();
	$item_act = $menu->getActive();
	$eid_top = $item_act->tree[0];
	$arr_sub = $menu->getItems(array('parent_id','level'),array($eid_top,2));
?>

<div class="m_<?php echo $mid.' '.$mnm; ?>"><div id="content_left"><?php 
	if(count($arr_sub)>0){
		echo'<div class="hzjj_left_top"><ul>';
		foreach($arr_sub as $m){
			$id = $m->id;
			$tit = $m->title;
			$lk = JRoute::_('index.php?Itemid='.$id,false);
			echo"<li class=\"hzjj_left_mouseout\" onmouseover=\"this.className='hzjjUlLi';\" onmouseout=\"this.className='hzjj_left_mouseout';\"><a href=\"".$lk."\">".$tit."</a></li>";
		}
		echo'</ul></div>';
	}else{?>
		<div><a href="<?php echo JRoute::_('index.php?Itemid='.$p15 ,false) ; ?>">
			<img src="<?php echo JURI::base(true); ?>/templates/<?php echo $t; ?>/img/index_8.jpg" width="178" height="31" border="0" /></a>
		</div>
		<div id="content_left_contenr">
			<div id="left_contenr_img"> </div>
			<ul>
				  <li><a href="<?php echo JRoute::_('index.php?Itemid='.$p12 ,false) ; ?>">科研项目</a></li>
				  <li><a href="<?php echo JRoute::_('index.php?Itemid='.$p12 ,false) ; ?>">发表论文</a></li>
				  <li><a href="<?php echo JRoute::_('index.php?Itemid='.$p12 ,false) ; ?>">开放课题招标</a></li>
				  <li><a href="<?php echo JRoute::_('index.php?Itemid='.$p12 ,false) ; ?>">开放平台</a></li>
			</ul>
		</div>
		<div id="content_left_bottom">
			<div id="left_bottom_img"> </div>
			<div id="demo" class="sub_link">
				<div id="demo1">
					<ul> <?php 
						$arr_art = jmcore::get_art('catid>0 and state=1',0,' ordering asc ','id,title,url','weblinks');
						if(count($arr_art)>0){
						foreach($arr_art as $m){
							$id	=$m->id;
							$title	=$m->title;
							$tit	=jmcore:: get_text_limit($title, 18);
							$url	=$m->url;
							echo'<li><a href="'.$url.'" target="_blank" title="'.$title.'">'.$tit.'</a></li>';
						}} ?>
					</ul>
				</div>
				<div id="demo2"></div>
			</div>
		</div><?php 
	} ?>
</div></div>

<script type="text/javaScript">
	var speed=80;
	var FGDemo=document.getElementById('demo');
	var FGDemo1=document.getElementById('demo1');
	var FGDemo2=document.getElementById('demo2');
	FGDemo2.innerHTML=FGDemo1.innerHTML;

	//alert(FGDemo1.offsetHeight);
	function Marquee1(){
		if(FGDemo1.offsetHeight>215){
			if(FGDemo2.offsetHeight-FGDemo.scrollTop<=0){
				FGDemo.scrollTop-=FGDemo1.offsetHeight;
			}else{
				FGDemo.scrollTop++;
			}
		}
	}
	var MyMar1=setInterval(Marquee1,speed);
	FGDemo.onmouseover=function(){clearInterval(MyMar1);}
	FGDemo.onmouseout=function(){MyMar1=setInterval(Marquee1,speed);} 
</script>